import request from '@/utils/request'
const prefixUrl = process.env.VUE_APP_DATA_API

/**
 * @description 反馈状态列表
 */
export function getStatusList (params) {
  return request({
    baseURL: prefixUrl,
    url: '/api/v1/status/list',
    method: 'get',
    params
  })
}

/**
 * @description 反馈列表
 */
export function getFbList (params) {
  return request({
    baseURL: prefixUrl,
    url: '/api/v1/feedback/list',
    method: 'get',
    params
  })
}

/**
 * @description 添加反馈
 */
export function addFb (data) {
  return request({
    baseURL: prefixUrl,
    url: '/api/v1/feedback/add',
    method: 'post',
    data
  })
}

/**
 * @description 修改反馈
 */
export function modifyFb (data) {
  return request({
    baseURL: prefixUrl,
    url: '/api/v1/feedback/modify',
    method: 'put',
    data
  })
}

/**
 * @description 录入mantis
 */
export function addToMantis (data) {
  return request({
    baseURL: prefixUrl,
    url: '/api/v1/feedback/mantis',
    method: 'post',
    data
  })
}

/**
 * @location http://192.168.88.247:4999/web/#/214/1831
 * @description dump列表
 */
export function getDumpList (params) {
  return request({
    baseURL: prefixUrl,
    url: '/api/v1/feedback/dump/list',
    params
  })
}
export function getDumpList1 (data) {
  return request({
    baseURL: prefixUrl,
    url: 'https://api.mgr.xzdesktop.cqttech.com/api/GetDumpList',
    method: 'post',
    data,
    noInterceptors: true
  })
}
/**
 * 创建导出任务
 * http://showdoc.wisetimes.cn:4999/web/#/80?page_id=3249
 * @param {*} data
 * @returns
 */
export function createExportFeedTask (data) {
  return request({
    baseURL: prefixUrl,
    url: '/api/v1/feedback/export',
    method: 'post',
    data
  })
}

/**
 * 查询导出任务结果
 * http://showdoc.wisetimes.cn:4999/web/#/80/3250
 * @param {*} params
 * @returns
 */
export function queryExportFeedTask (params) {
  return request({
    baseURL: prefixUrl,
    url: '/api/v1/feedback/export_task',
    method: 'get',
    params
  })
}
